<?
$stylecss = "default.css";
if ($user && $curtheme)
{
  $filename = "themes/".$curtheme."/default.css";
  if (file_exists($filename) )
  {
    $stylecss = $filename;
  }
}


$menu = array(
  "news"=>$msg["MenuNews"], 

  "find"=>$msg["MenuPlugins"],
  
  ":find"=>array(
    "find"=>$msg["SubPlugFind"], 
    "favorites"=>$msg["SubFavorites"], 
  ),

  "personal"=>$msg["MenuMyPage"]
);


if ($user) 
{
  $menu = array_merge($menu,

    array(
      ":personal"=>array(
        "personal"=>$msg["SubMyProfile"], 
        "personal_plugins"=>$msg["SubMyPlugs"], 
        "personal_settings"=>$msg["SubMySettings"]
       )
    )

  );

}


if ($user["admin"]) 
{
  $menu["admin"] = $msg["MenuAdmin"];
}


$toppage = $page;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<!--<meta http-equiv="content-type" content="text/html; charset=UTF-8">-->
  <meta http-equiv="content-type" content="text/html; charset=windows-1251">
  <meta http-equiv="description" content="PlugRing">
  <meta name="keywords" content="far plugins">
  <link rel="stylesheet" type="text/css" href="<?=$stylecss?>">

  <!--  <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> -->

<!--
  <script type="text/javascript" src="jquery/jquery.js"></script>
  <script type="text/javascript" src="jquery/jquery.lightbox-0.5.js"></script>
  <link rel="stylesheet" type="text/css" href="jquery/jquery.lightbox-0.5.css" media="screen"/>
-->

<!--
  <script src="http://www.google.com/jsapi" type="text/javascript"></script>
  <script type="text/javascript" charset="utf-8">google.load("jquery", "1.3");</script>
  <link rel="stylesheet" href="pphoto/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
  <script src="pphoto/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
-->
  <title>PlugRing</title>

</head>

<body>

<?
$filename="page_".$page.".php";

if (file_exists($filename) )
{
  include $filename;
}
else
{
  include "page_not_found.php";
};

include "div_footer.php";
?>

</body>

</html>
